<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" >
	<link type="text/css" rel="stylesheet" href="../assets/css/style.css" />
    <script type="text/javascript" src="../assets/js/jquery-1.11.1.min_044d0927.js"></script>
	<script type="text/javascript" src="../assets/js/jquery.bxslider_e88acd1b.js"></script>
    <script type="text/javascript" src="../assets/js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="../assets/js/menu.js"></script>
	<script type="text/javascript" src="../assets/js/select.js"></script>
	<script type="text/javascript" src="../assets/js/lrscroll.js"></script>
    <script type="text/javascript" src="../assets/js/iban.js"></script>
    <script type="text/javascript" src="../assets/js/fban.js"></script>
    <script type="text/javascript" src="../assets/js/f_ban.js"></script>
    <script type="text/javascript" src="../assets/js/mban.js"></script>
    <script type="text/javascript" src="../assets/js/bban.js"></script>
    <script type="text/javascript" src="../assets/js/hban.js"></script>
    <script type="text/javascript" src="../assets/js/tban.js"></script>
	<script type="text/javascript" src="../assets/js/lrscroll_1.js"></script>
<title>欢迎登陆</title>
</head>
<body>  
<!--Begin Header Begin-->
<div class="soubg" id="box1">
	<div class="sou">
        <span class="fr">
        	<span class="fl">你好，请<a href="#" id="id1" @click="get">登录</a>&nbsp; <a href="Regist.html" style="color:#ff4e00;">免费注册</a>&nbsp; </span>
            <span class="fl">|&nbsp;关注我们：</span>
            <span class="s_sh"><a href="#" class="sh1">新浪</a><a href="#" class="sh2">微信</a></span>
            <span class="fr">|&nbsp;<a href="#">手机版&nbsp;<img src="../assets/images/s_tel.png"  alt=""/></a></span>
        </span>
    </div>
</div>
<!--End Header End--> 
<!--Begin Login Begin-->
<div class="log_bg" id="box">
    <div class="top">
        <div class="logo"><a href="Index.html"><img src="../assets/images/logo.png"  alt=""/></a></div>
    </div>
	<div class="login">
    	<div class="log_img"><img src="../assets/images/l_img.png" width="611" height="425"  alt=""/></div>
		<div class="log_c">
        	<form action="">
            <table border="0" style="width:370px; font-size:14px; margin-top:30px;" cellspacing="0" cellpadding="0">
              <tr height="50" valign="top">
              	<td width="55">&nbsp;</td>
                <td>
                	<span class="fl" style="font-size:24px;">登录</span>
                    <span class="fr">还没有商城账号，<a href="Regist.html" style="color:#ff4e00;">立即注册</a></span>
                </td>
              </tr>
              <tr height="70">
                <td>用户名</td>
                <td><input type="text" v-model="userName" class="l_user" /></td>
              </tr>
              <tr height="70">
                <td>密&nbsp; &nbsp; 码</td>
                <td>
                    <input type="password" v-model="password" class="l_pwd" />
                </td>
              </tr>
              <tr>
              	<td>&nbsp;</td>
                <td style="font-size:12px; padding-top:20px;">
                	<span style="font-family:'宋体',serif;" class="fl">
                    	<label class="r_rad"><input type="checkbox" /></label><label class="r_txt">请保存我这次的登录信息</label>
                    </span>
                    <span class="fr"><a href="#" style="color:#ff4e00;">忘记密码</a></span>
                </td>
              </tr>
              <tr height="60">
              	<td>&nbsp;</td>
                <td><input type="submit" value="登录" class="log_btn" @click.prevent="login"/></td>
              </tr>
            </table>
            </form>
        </div>
    </div>
</div>
<!--End Login End--> 
<!--Begin Footer Begin-->
<div class="btmbg">
    <div class="btm" >
        备案/许可证编号：蜀ICP备12009302号-1-www.dingguagua.com   Copyright © 2015-2018 尤洪商城网 All Rights Reserved. 复制必究 , Technical Support: Dgg Group <br />
        <img src="../assets/images/b_1.gif" width="98" height="33"  alt=""/><img src="../assets/images/b_2.gif" width="98" height="33" alt=""/><img src="../assets/images/b_3.gif" width="98" height="33" alt="" /><img src="../assets/images/b_4.gif" width="98" height="33" alt=""/><img src="../assets/images/b_5.gif" width="98" height="33" alt=""/><img src="../assets/images/b_6.gif" width="98" height="33" alt=""/>
    </div>    	
</div>

</body>
<script src="../assets/vue.js"></script>
<script src="../assets/axios.js" ></script>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
<script>
    new Vue({
        el:'#box',
        data:{
            userName:'',
            password: ''
        },
        methods:{
/*            get() {
                alert(123);
                axios.get('http://localhost:8080/user/retrieveAllUser').then( res =>{
                    console.log(res)
                    this.msg = res.data.data;
                    console.log(this.msg)
                })
            },*/
            login(){
                var js ={"userName":this.userName,"password":this.password}
                console.log(js)
                axios.post('/user/login',js).then(res=>{
                    console.log(res)
                    if ("欢迎登录" === res.data.message){
                        alert("欢迎登录");
                        axios.defaults.headers.common['Authorization']=res.headers.authorization

                    }
                })
            }
        },

    });
/*    $(function () {
        $('#id1').click(function () {
            alert(111)
            console.log(111)
            $.get('http://localhost:8080/user/retrieveAllUser',function(data,status){
                console.log("1231")
                console.log(data)
                alert(data)
            });
            alert(222)
        })
    })*/
</script>
</html>
